import {computed, ref} from "vue";

const zIndex = ref(0)

const useZIdex = (initialValue = 2000) => {
  const initialZIndex = ref(initialValue)
  const currentZIdex = computed(() => zIndex.value + initialZIndex.value)
  const nextZIndex = () => {
    zIndex.value++
    return currentZIdex.value
  }
  return{
    initialZIndex,
    currentZIdex,
    nextZIndex
  }
}
export default useZIdex
